package com.fwtai.web;

import com.fwtai.bean.PageFormData;
import com.fwtai.datasource.DaoHandle;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.HashMap;

/**
 * 咨询回复访问数据库
 * @作者 田应平
 * @版本 v1.0
 * @创建时间 2021-08-13 17:06:59
 * @QQ号码 444141300
 * @Email service@yinlz.com
 * @官网 <url>http://www.fwtai.com</url>
*/
@Repository
public class AdvisoryReplyDao{

    @Resource
    private DaoHandle dao;

    public int editDisplay(final PageFormData formData){
        return dao.execute("advisory_reply.editDisplay",formData);
    }

    public String queryExistById(final String kid){
        return dao.queryForString("advisory_reply.queryExistById",kid);
    }

    public HashMap<String, Object> queryById(final String kid){
        return dao.queryForHashMap("advisory_reply.queryById",kid);
    }

    public int delById(final String kid){
        return dao.execute("advisory_reply.delById",kid);
    }

    public HashMap<String,Object> listData(final PageFormData formData){
        return dao.queryForPage(formData,"advisory_reply.listData","advisory_reply.listTotal");
    }
}